<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 输出100-200之间所有的质数
        // a%1 =a,a%a=1,
        // 初始值 100，<=200;
        // i 2 a/2; a % i ==0
        for(var i=100;i<=200;i++){
       for(var j=2;j<=i-1;j++){
        var count = 0;
        if(i%j==0){
            count++;
            break;
        }
        }
        if(count==0){
        console.log(i);
       }
      }
    </script>
</body>
</html>